//
//  FMPlayerService.h
//  FMHome
//
//  Created by apple on 17/4/13.
//  Copyright © 2017年 apple. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FMRemoteAudioTool.h"
#import "FMLocalAudioTool.h"

@interface FMPlayerService : NSObject

@property (nonatomic, copy) NSURL *currentPlayURL;

@property (nonatomic, assign) AudioState state;


+ (instancetype)shareInstance;

- (void)playWithURL:(NSURL *)url withStateBlock: (void(^)(AudioState state))stateBlock;

- (void)playCurrentAudio;
- (void)pauseCurrentAudio;

- (float)currentPlayTime;
- (float)currentTotalTime;

- (void)seekBack: (unsigned int)time;
- (void)seekFast: (unsigned int)time;
- (void)seekProgress: (float)progress;

- (void)changeRate: (float)rate;

@end
